﻿
@{
    ViewBag.Title = "Add";
}

<h2>用户添加</h2>
<script src="~/Scripts/axios.min.js"></script>
<script src="~/Scripts/vue.min.js"></script>
<!--页面模板区域-->
<div id="addUser">
    <table>
        <tr>
            <td><label>用户名：</label><input id="userName" type="text" v-model="formData.userName" /></td>
            <td><label>状态：</label><input id="userStatus" type="text" v-model="formData.userStatus" /></td>
        </tr>
        <tr>
            <td><label>手机号：</label><input id="userPhone" type="text" v-model="formData.userPhone" /></td>
            <td><label>年龄：</label><input id="userAge" type="text" v-model="formData.userAge" /></td>
        </tr>
        <tr>
            <td></td>
        </tr>
        <tr>
            <td><input id="btnSubmit" type="button" value="提交" v-on:click="add()"/></td>
            <td><input id="btnRest" type="button" value="取消" /></td>
        </tr>
    </table>
</div>
<script>
    var app = new Vue({
        el: '#addUser',
        data: {
            FormData: {
                userName: '', //用户名
                userStatus: '', //状态
                userPhone: '', //电话联系方式
                userAge: '' //年龄
            }
        },
        methods: {
            add() {
                console.log(this.FormData);
            }
        }
    });
</script>